import request from '@/utils/request'
//获取目录树
export function fetchMasterdataDirectoryList(data) {
  return request({
    url: '/system/masterdata/MasterdataDirectory/list',
    method: 'post',
    data,
  })
}
//删除目录
export function deleteMasterdataDirectory(id) {
  return request({
    url: '/system/masterdata/MasterdataDirectory/delete/' + id,
    method: 'post',
  })
}

export function delDataextractionJob(idS) {
  return request({
    url: '/system/unstructuredData/delete/' + idS,
    method: 'get',
  })
}

export function startOneForSpark({ id }) {
  console.log(id)
  return request({
    url: '/system/unstructuredData/sync/' + id,
    method: 'get',
  })
}

export function getDataextractionJobList(data) {
  return request({
    url: '/system/unstructuredData/list',
    method: 'post',
    data,
  })
}

export function alinkDetail(data) {
  return request({
    url: `/system/unstructuredData/link`,
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
    },
    data,
  })
}

export function addkDetail(data) {
  return request({
    url: `/system/unstructuredData/add`,
    method: 'post',
    data,
  })
}

export function updateDetail(data) {
  return request({
    url: `/system/unstructuredData/update`,
    method: 'post',
    data,
  })
}
